package common;

/**
 * @ClassName:ReturnInfoEnum
 * @Description:返回前端的成功或者失败的消息
 * @Author:Deamer
 * @Date:2020/3/30 17:59
 **/
public enum ReturnInfoEnum implements ReturnInfoInterface {
    SUCCESS(1000, "OK"),
    REQUEST_FAIL(1001, "请求失败"),
    LOST_NECCESSARY_PARAM(800, "缺少必要的参数");

    private int code;//消息代码
    private String msg;//消息内容

    ReturnInfoEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return 0;
    }

    @Override
    public String getMessage() {
        return null;
    }
}
